package com.lipaluma.xml.adaptor;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.lipaluma.field.adaptor.Adaptor;
import com.lipaluma.xml.util.XmlParam;

@XmlRootElement(name=XmlCustomAdaptor.ADAPT)
@XmlAccessorType(XmlAccessType.FIELD)
public class XmlCustomAdaptor implements XmlAdaptor {
	public static final String ADAPT = "adapt";
	
	@XmlAttribute
	protected Class<? extends Adaptor> with;
	@XmlElement(name="param")
	private XmlParam[] params;
	
	@Override
	public Class<? extends Adaptor> with() {
		return with;
	}
	
	public XmlParam[] getParams() {
		return params;
	}
}
